package com.eagle.common.mapper;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 
 * 角色拥有资源对应表 数据库操作接口
 * 
 */
@Repository
public interface RoleRResourcesMapper<T,P> extends BaseMapper<T,P> {

	/**
	 * 根据RoleIdAndResourceId更新
	 */
	 public Integer updateByRoleIdAndResourceId(@Param("bean") T t,@Param("roleId") Integer roleId,@Param("resourceId") Integer resourceId);


	/**
	 * 根据RoleIdAndResourceId删除
	 */
	 public Integer deleteByRoleIdAndResourceId(@Param("roleId") Integer roleId,@Param("resourceId") Integer resourceId);


	/**
	 * 根据RoleIdAndResourceId获取对象
	 */
	 public T selectByRoleIdAndResourceId(@Param("roleId") Integer roleId,@Param("resourceId") Integer resourceId);


}
